package org.munoz.shared;

public class GameResult {
	private int winner;
	private GameResultReason gameResultReason;
	
	public GameResult(int winner, GameResultReason gameResultReason){
		this.winner = winner;
		this.gameResultReason = gameResultReason;
	}
	
	public GameResult getCopy(){
		return new GameResult(winner, gameResultReason);
	}

	public int getWinner() {
		return winner;
	}

	public void setWinner(int winner) {
		this.winner = winner;
	}

	public GameResultReason getGameResultReason() {
		return gameResultReason;
	}
	
	public boolean equals(GameResult other){
		if(this == null && other == null){
			return true;
		}
		return winner == other.winner
				&& gameResultReason == other.gameResultReason;
	}
	

}
